package xyz.labmem.lipx.core.config

import io.netty.handler.ipfilter.IpFilterRuleType
import io.netty.handler.ipfilter.IpSubnetFilterRule
import java.io.BufferedReader

/**
 * @description: do something
 * @author: ltty
 * @date: 2022/5/31 14:12
 */
class AccessListReader {

    companion object {
        val accessList = ArrayList<IpSubnetFilterRule>()

        fun read(br: BufferedReader) {
            br.readLines().forEach {
                accessList.add(
                    IpSubnetFilterRule(it, 32, IpFilterRuleType.ACCEPT)
                )
            }
        }
    }
}